package com.lzp.copyui.mvvmtest;

import android.os.Bundle;

import androidx.lifecycle.Observer;

import com.base.mvvm.BaseMvvmActivity;
import com.base.mvvm.BindViewModel;
import com.lzp.copyui.R;

import org.jetbrains.annotations.Nullable;

/**
 * @describe:
 * @Author: lixiaopeng
 * @Date: 12/3/20
 */
public class MVVMTest2Activity extends BaseMvvmActivity {

    @BindViewModel
    private MvvmTestViewModel viewModel;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.mvvm_test_activity);

        viewModel.doTest();
        viewModel.getTestLiveData().observe(this, new Observer<String>() {
            @Override
            public void onChanged(String s) {

            }
        });
    }
}
